<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
  <head>
    
    <title>支出费用管理 </title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    	
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="../css/manual.css">
	
  </head>
  
  <body>
  
  <table  width="100%"  border="0" cellpadding="0" cellspacing="0" height="100%">
  	<tr valign="top">
  	
  		<td height="100">
  			 <jsp:include page="/background/operator/head.jsp"></jsp:include>
  		</td>
  	</tr>
  	<tr valign="top">
  		<td>
  		
   
   
  <table width="100%"  border="0" cellpadding="0" cellspacing="0">
  
 <tr>
    	<td width="270" align="center">
    		
    	</td>
    	<td width="100%">

    	</td>
    </tr>
    
    <tr>
    	<td valign="top">
     		<div>
     		
     		</div>
					<s:include value="/background/operator/left.jsp"></s:include>		
     	</td>
     	
     	
     	<td valign="top" >
     	
     	<table width="100%" border="0" cellpadding="0" bgcolor="#e5f3ff" cellspacing="0" style= "border:1px solid #ffffff; border-top-color:#6cb1f1;">
     		<tr>
     			<td>查找支出费用信息
				<input type="button" value="查看谁有权限" 
     				onclick="javascript:openUrlForDialog('selectuserlimited_warehouse.action?limitedCode=<s:property value="limitedcode"/>')"/>
     				
     			</td>
     			
     			<td align="right"> <a href="outlayadd.jsp">支出费用</a> </td>
     		</tr>
     	</table>
     	
     	<table align="center">
     		<tr>
     			<td><s:fielderror id="errormessage" /></td>
     		</tr>
     	</table>
     	
    <form id="manageoutlay" name="manageoutlay" onSubmit="return true;" action="manageoutlay.action" method="POST" >
    	
			<table  border="0" >
				<tr>
				  <td>
					  查找支出费用信息:<input type="text" name="searchStr" size="30" value="<s:property value="searchStr"/>"/>
					  <input type="submit" value="查找" />
				  </td>
			  </tr>
			</table>
	</form> 
	
	
		<table width="100%" border="0" cellpadding="0" bgcolor="#e5f3ff" cellspacing="0" style= "border:1px solid #ffffff; border-top-color:#6cb1f1;">
     		<tr>
     			<td>支出费用列表</td>
     		</tr>
     	</table>
		
		
		
		<table >
			<tr>
				
					<td style="border-bottom:#e5f3ff solid 1px;" width="105">支出ID</td>
					<td style="border-bottom:#e5f3ff solid 1px;">支出类型</td>
					<td style="border-bottom:#e5f3ff solid 1px;" >费用</td>
					<td style="border-bottom:#e5f3ff solid 1px;">描述/备注</td>
					
				
					
					<td style="border-bottom:#e5f3ff solid 1px;" width="90">时间</td>
					<td style="border-bottom:#e5f3ff solid 1px;" width="105">流程状态</td>
					<td style="border-bottom:#e5f3ff solid 1px;">操作人</td>
					<td style="border-bottom:#e5f3ff solid 1px;">操作</td>
				</tr>
		
			<s:iterator id="list" value="list">
				<tr>
					
					<s:if test="#list.state_outlay == 9">
					
					<td style="border-bottom:#e5f3ff solid 1px;"><S>
					<a href="#"><s:property value="#list.id_outlay"/></a>
					
					</S></td>
					<td style="border-bottom:#e5f3ff solid 1px;"><S><s:property value="#list.kindvalue_outlay"/></S></td>
					<td style="border-bottom:#e5f3ff solid 1px;"><S><s:property value="#list.total_outlay"/></S></td>
					<td style="border-bottom:#e5f3ff solid 1px;"><S><s:property value="#list.remark_outlay"/></S></td>
					
					<td style="border-bottom:#e5f3ff solid 1px;"><S><s:property value="#list.date_outlay"/></S></td>
					
					<td style="border-bottom:#e5f3ff solid 1px;"><S>
						<button onclick="javascript:window.showModalDialog('<%=basePath %>flow/enterflow.action?kind=HOUSEWARE.RECEIPTLIST&kindid=<s:property value="#receiptlistList.id_receiptlist"/>','son','DialogWidth:800px;DialogHeight:600px;')">
							查看流程
						</button>
					</S></td>
					
					<td style="border-bottom:#e5f3ff solid 1px;"><S><s:property value="#list.username_outlay"/></S></td>
					
					
					<td style="border-bottom:#e5f3ff solid 1px;">
						
							<S> 不可操作</S>
					</td>
					

					
					</s:if>
					
						<s:else>
						
						
					<td style="border-bottom:#e5f3ff solid 1px;">
						<a href="#"><s:property value="#list.id_outlay"/></a>
						
					
					</td>
					
					
					<td style="border-bottom:#e5f3ff solid 1px;">
					<a href="#">
						<s:property value="#list.kindvalue_outlay"/>
					</a>
					</td>
					<td style="border-bottom:#e5f3ff solid 1px;">
					
						<s:property value="#list.total_outlay"/>
					
						</td>
					<td style="border-bottom:#e5f3ff solid 1px;"><s:property value="#list.remark_outlay"/>
					</td>
				
					<td style="border-bottom:#e5f3ff solid 1px;"><s:property value="#list.date_outlay"/></td>
					
					<td style="border-bottom:#e5f3ff solid 1px;">
					
					<s:property value="flowRecordlistMap.get(#receiptlistList.id_receiptlist).cnname_recordlist"/>
					<br/>
					<button onclick="javascript:window.showModalDialog('<%=basePath %>flow/enterflow.action?kind=HOUSEWARE.RECEIPTLIST&kindid=<s:property value="#receiptlistList.id_receiptlist"/>','son','DialogWidth:800px;DialogHeight:600px;')">
						查看流程
					</button>
					
					</td>
					
					<td style="border-bottom:#e5f3ff solid 1px;"><s:property value="#list.username_outlay"/></td>
					
					
					<td style="border-bottom:#e5f3ff solid 1px;">
							
						<s:if test="#session.userInfo.user_email == #list.useremail_outlay">
							<a href="javascript:del('<s:property value="#list.id_outlay"/>',<s:property value="#list.id_outlay"/>)"> 取消 </a>
						</s:if>
						<s:else>
								不可操作
						
						</s:else>
					</td>
						
						
							
						</s:else>
				</tr>
			</s:iterator>
		</table>
	
	<table width="100%" border="0" cellpadding="0" bgcolor="" cellspacing="0" >
				<tr >
					<td >
						<%
						int pageSize = (Integer) request.getAttribute("pageSize");
						int beginPageNum =  (Integer) request.getAttribute("beginPageNum");
						int countRow =  (Integer) request.getAttribute("rowNum");
					    int countPage =(countRow-1)/pageSize+1;
					   // String brand = (String)request.getAttribute("brand");//*/
					    
					    String searchstr = (String)request.getParameter("searchStr");//*/
					    if(searchstr != null){
					    	searchstr = searchstr.replaceAll("%", "%25");
					    }else{
					    	searchstr = "";
					    }
					    
					    //beginPageNum =  (pageNum - 1) * pageSize;
						StringBuffer chagePageBuff = new StringBuffer();
						if(countPage >= 2){
							for(int i=0;i<countPage;i++){
								if(beginPageNum == i*pageSize){
									%>
									<%=i+1 %>
									<%
								}else{
									%>
									<a href="manageoutlay.action?searchStr=<%=searchstr %>&beginPageNum=<%=i*pageSize %>">
									[<%=i+1 %>] </a>
									<%
								}
							}
						}
						//*/
						%>
					</td>

				</tr>
				
			</table>
			
	</td>
	
	
	
</tr>

</table>

</td>
</tr>
<tr valign="bottom">
	<td>
		<jsp:include page="/background/operator/tail.jsp"></jsp:include>
	</td>
</tr>
</table>



  </body>
<script type="text/javascript">

function del(name,id){
	if(confirm("取消  "+"单号:"+id)){
		window.location.href='canceloutlay.action?id=' + id;
	}
}
</script>
</html>
